package com.yn.service.zy.model.dto;

import cn.hutool.core.bean.BeanUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yn.common.model.zy.TDoctorInfoDO;
import com.yn.common.utils.BeanUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.ObjectUtils;

import java.sql.Date;
import java.util.List;

/**
 * @ClassName: TDoctorInfoOutDTO
 * @Description:
 * @Author: lxp
 * @Date: 2025/5/6 16:55
 **/
@Data
@ApiModel("用户就医绿通出参")
public class TDoctorInfoUserDTO {
    @ApiModelProperty("主键id")
    private Integer doctorId;

    @ApiModelProperty("医生名称")
    private String doctorName;

    @ApiModelProperty("医生头像地址")
    private String headImageUrl;

    @ApiModelProperty("职称")
    private String doctorLever;

    @ApiModelProperty("医院名称")
    private String hospitalName;

    @ApiModelProperty("科室名称集合")
    private List<OrganDepartmentDTO> departments;

    @ApiModelProperty("学历")
    private String education;

    @ApiModelProperty("专业擅长")
    private String professionalField;

    @ApiModelProperty("个人介绍")
    private String doctorIntro;

    @ApiModelProperty("电话")
    private String phoneNumber;


    public static TDoctorInfoUserDTO transform(TDoctorInfoOutDTO tDoctorInfoDO){
        if (ObjectUtils.isEmpty(tDoctorInfoDO)) {
            return null;
        }
        TDoctorInfoUserDTO tDoctorInfoUserDTO = new TDoctorInfoUserDTO();
        BeanUtil.copyProperties(tDoctorInfoDO, tDoctorInfoUserDTO);
        return tDoctorInfoUserDTO;
    }
}
